<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>2023新年快乐</title>
    <style>
        .over-lay {
            width: 100%;
            height: 100vh;
            position: fixed;
            left: 0;
            bottom: 0;

            z-index: 20;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            background: url("./img/indexbg.jpg") no-repeat center;
            background-size: cover;
        }

        .user-form {
            width: 500px;
            height: 500px;
            margin: auto;
            border: 1px dashed #666;
            background-color: hsla(0, 0%, 100%, 0.6);
            position: relative;
        }

        .user-form .tip {
            color: #f64f59;
            font-size: 14px;
            width: 80%;
            position: absolute;
            bottom: 10px;
            left: 0;
            right: 0;
            margin: 0 auto;
            text-align: center;
        }

        .user-form .form-wrap {
            width: 80%;
            margin: 150px auto 50px;
        }

        .form-wrap input {
            display: block;
            border: 1px solid #f64f59;
            outline: none;
            height: 40px;
            width: 100%;
            border-radius: 20px;
            text-indent: 10px;
        }
        .form-wrap input::-webkit-input-placeholder {
            color: #f64f59;
        }

        .form-wrap input:first-child {
            margin-bottom: 24px;
        }

        .btn-list {
            width: 60%;
            margin: 0 auto;
        }

        .btn-list button {
            border: 1px solid #ff1e56;
            border-radius: 20px;
            outline: none;
            height: 40px;
            width: 100%;
            cursor: pointer;
            background: #ff1e56;
            /* fallback for old browsers */
            background: -webkit-linear-gradient(to right, #1e90ff, #f9c942, #ff1e56);
            /* Chrome 10-25, Safari 5.1-6 */
            background: linear-gradient(to right, #1e90ff, #f9c942, #ff1e56);
            /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
            color: #fff;
            line-height: 40px;
            font-weight: bold;
            letter-spacing: 2px;
        }
        @media (max-width:767px) {
            .user-form {
                width: 80%;
                height: 350px;
            }
            .user-form .form-wrap { 
                margin: 100px auto 30px;
            }
        }
    </style>
</head>

<body>
    <div class="over-lay">
        <div class="user-form">
            <p class="tip">Tips:想看烟花吗？输入祝福语后发给你的朋友吧！</p>
            <div class="form-wrap">
                <input type="text" placeholder="输入你的祝福语吧，最多二十个字！" maxlength="20" id="msg">
                <input type="text" placeholder="你朋友的名字" id="muser">
            </div>
            <div class="btn-list">
                <button onclick="toFireHtml()">点击进入</button>
            </div>
        </div>
    </div>

    <script>
        function toFireHtml() {
            let msg = document.getElementById('msg').value
            let muser = document.getElementById('muser').value
            if (!msg && !muser) {
                alert('填写后方可进入！')
            } else {
                let layDom = document.getElementsByClassName('over-lay')[0]
                layDom.style.display = 'none'
                window.location.href = './fire.html?msg=' + msg + '&muser=' + muser

            }
        }
    </script>
</body>

</html>